package name.matthewgreet.strutscommons.form; import org.apache.struts2.Validateable; import name.matthewgreet.strutscommons.annotation.ManualParameterConversion; import name.matthewgreet.strutscommons.interceptor.FormFormatterInterceptor; import name.matthewgreet.strutscommons.util.StrutsMiscellaneousLibrary; /** * Interface for Struts 2 forms that can be processed by {@link FormFormatterInterceptor} and * {@link StrutsMiscellaneousLibrary#updateDisplay StrutsMiscellaneousLibrary#updateDisplay}. */ public interface FormattableForm extends Form { /** * <P>Returns formatted text and/or sets string fields from unprocessed form fields of the implementing class. This * is the reverse of {@link Form#manualParameterConvert Form#manualParameterConvert} and {@link Validateable#validate Validateable#validate}.</P> * * <P>Unprocessed form fields are those not processed by {@link FormFormatterInterceptor} for a number of reasons.</P> * <UL> * <LI>Form field is a string, string array, or string collection, which are already formatted.</LI> * <LI>Form field is annotated with {@link ManualParameterConversion}.</LI> * <LI>Form field is a non-string array.</LI> * <LI>Form field is a non-string collection without a converter annotation.</LI> * </UL> */ public FormatResult format(); }